<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" href="css/common.css" type="text/css" />

<link href="css/adminstyle.css" rel="stylesheet" type="text/css">

<title>管理区域</title>

<script src="js/js.js"></script>
<script language="javascript" type="text/javascript" src="My97DatePicker/WdatePicker.js"></script>
<script  language="javascript" type="text/javascript" src="js/jquery-1.9.1.min.js"></script>

<script>

function delc(id){

	if(confirm('确认要删除此栏目，将删除所属子栏目及信息'))	{

		self.location.href='user_delete.html?id='+id;

	}

}

function submits1(value){

	var check_flg = false;

	$("input:checkbox[name='id[]']:checked").each(function(){

            check_flg = true; 

    })

    if(check_flg==true){

		document.getElementById('form').action=value;

		document.getElementById('form').submit();

	}else{

		alert('请选中相应的人员进行操作');        	

    }

	

}



function openTab(url,height,width){

	window.open (url,'newwindow','height='+height+',width='+width+',top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no'); 

}



function submits2(value){

	document.getElementById('form').action=value;

	document.getElementById('form').submit();

}</script>

</head>



<body>
<div id="man_zone">
<?$page_th = Common::_t('page_th');?>
    <?$page_selected = Common::_t('page_select');?>
    <?$page_search = Common::_t('page_search');?>
<div style="background-color:#FFFFFF ">

<div class="search_condition">

<div style="margin-top:10px;margin-bottom:10px;">

<form method="get">

&nbsp;&nbsp;&nbsp;
 <input type="hidden" name="search" value="1">
<input type="hidden" name="id" id="id" value="<?=getStr($extract_vars, 'id')?>">
<?=getStr($page_th, 'email')?><input name="email" type="text" value="<?=getParamValue('email')?>" size="30"/>
<?=getStr($page_th, 'phone')?> <input name="phone" type="text" value="<?=getParamValue('phone')?>"  size="30" />
<?=getStr($page_th, 'qq')?><input name="qq" type="text" value="<?=getParamValue('qq')?>"  size="30" />
&nbsp;&nbsp;&nbsp;

<input value="<?=$page_search?>" class="PublicBot" name="" type="submit" />

&nbsp;&nbsp;&nbsp;
</form>

</div>

</div>

<form method="get" id="form" action="user_delete.html">

  <table width="98%" border="0" align="center"  cellpadding="3" cellspacing="1" class="tableborder">

    <tr class="header">

    <td width="2%"></td>

      <td width="8%"><?=getStr($page_th, 'email')?></td>

      <td width="8%"><?=getStr($page_th, 'user_name')?></td>

      <td width="8%"><?=getStr($page_th, 'skype')?></td>

      <td width="8%"><?=getStr($page_th, 'qq')?></td>

      <td width="8%"><?=getStr($page_th, 'phone')?></td>

      <td width="8%"><?=getStr($page_th, 'english_level')?></td>

      <td width="8%"><?=getStr($page_th, 'user_type')?></td>

      <td width="8%"><?=getStr($page_th, 'integral')?></td>
      
      <td width="8%"><?=getStr($page_th, 'register_time')?></td>

      <td width="8%"><?=getStr($page_th, 'user_status')?></td>
   
      <td width="8%"><?=getStr($page_th, 'operator')?></td>

    </tr>
    <?
    if(!empty($list)){
    foreach($list as $v){

	?>
    <tr bgcolor="#FFFFFF">
	  <input type="hidden" name="user_id" id="user_id" value="<?=$v['id']?>"/>
      <td align="center"><input type="checkbox" name="id[]" id="checkbox" value="<?=$v['id']?>"></td>

      <td><a href="user_info.html?id=<?=$v['id']?>"><?=$v['email']?></a></td>

      <td align="center"><?=$v['english_name']?></td>

      <td align="center"><?=$v['skype_id']?></td>

      <td align="center"><?=$v['qq']?></td>

      <td align="center">
      <?=$v['phone']?>
      <?if($v['real_phone']==SMS_SERVER_2){?>
      	已验证
      <?}?>
	  <?if($v['phone']!=''&&$v['real_phone']==SMS_SERVER_1){?>
      	未验证
      <?}?>
      </td>

      <td align="center"><?=getStr($level_pair, $v['level'])?></td>

      <td align="center"><?=$v['user_type_name']?>
      </td>

      <td align="center"><?=$v['integral']?></td>

      <td align="center"><?=date('Y-m-d H:i:s',$v['register_time'])?></td>

      <td align="center"><?=$v['status_name']?></td>

      <td align="center"><input type="button" name="my_student" value="我的学生" id="my_student" id2="<?=$v['id']?>" class="PublicBot" ></td>
    </tr>
    <?
	}}
	?>

 <tr bgcolor="#FFFFFF">

 <td align="center"><input type="checkbox" name="chkall" id="checkbox"  onClick="CheckAll(this.form)"></td>

 <td colspan="12">
  <?echo $page; ?>
 </td>
 </tr>
  </table>
 </form>
</div>
</div>
<script>
$("#my_student").click(function(){
	var fund_user_id=$("#id").val();
	var user_id = $(this).attr("id2");
	var postJsonData = {"fund_user_id":fund_user_id,"user_id":user_id};
	$.ajax({
		 type:'POST',
		 url:'user_updateuserByFunduser.html',
		 data:postJsonData,
		 dataType: 'json',
		 success:(function(res){
			if(res.success=='success'){
				alert('更新成功');
			}else{
				alert('该人员已更新,若有问题,请联系我们400-632-5656');
			}	
		 }),
		 async:false
		});	
})	
</script>	
</body>

</html>

